package com.letfox.redis.service.impl;

import java.util.concurrent.TimeUnit;

import org.springframework.beans.factory.annotation.Autowired;

import com.letfox.redis.util.HashOperationUtil;
import com.letfox.redis.util.RedisCacheUtil;
import com.letfox.redis.util.SetOperationUtil;
import com.letfox.redis.util.ValueOperationUtil;

public class RedisCacheBaseImpl<T> {

	@Autowired
	public RedisCacheUtil<T> redisCacheUtil;
	@Autowired
	public HashOperationUtil<T> hashCahceUtil;
	@Autowired
	public SetOperationUtil<T> setOperationUtil;
	@Autowired
	public ValueOperationUtil<T> valueOperationUtil;
	
	public void setExpire(String key, int timeout,TimeUnit unit){
		redisCacheUtil.setExpire(key, timeout, unit);
	}
	
	public boolean checkKeyExists(String key){
		return redisCacheUtil.checkKeyExists(key);
	}
}
